package edu.up.firesawakening;

import java.io.Serializable;
import java.util.Vector;

/**
 * Represents a single unit
 * 
 * @author Alex Hanemann
 * @author Matt Delaney
 * @version 7 December 2012
 */
public class MeleeUnit extends Unit implements Serializable, Cloneable {

	/**
	 * Serial ID
	 */
	private static final long serialVersionUID = 7034401709680792264L;

	/**
	 * Constructs a melee unit with the specified attributes.
	 * 
	 * @param healthIn
	 *            starting health
	 * @param damageIn
	 *            attack power
	 * @param armorIn
	 *            armor rating
	 * @param moveRangeIn
	 *            move range
	 * @param attackRangeIn
	 *            attack range
	 * @param playerIn
	 *            owner of this unit
	 */
	public MeleeUnit(int healthIn, int damageIn, int armorIn, int moveRangeIn,
			int attackRangeIn, int playerIn) {
		super(healthIn, damageIn, armorIn, moveRangeIn, attackRangeIn, playerIn);
	}

	/**
	 * Clones the object.
	 * 
	 * Used in game creation.
	 */
	@Override
	public MeleeUnit clone() {
		MeleeUnit unit = new MeleeUnit(m_maxHealth, m_atkPow, m_armor,
				m_moveRange, m_attackRange, m_player);
		unit.setHealth(m_health);
		unit.setAttackAvailable(m_attackAvailable);
		unit.setMovesLeft(m_movesLeft);
		return unit;
	}
}
